//
//  ThirdViewController.m
//  UI_豆瓣项目
//
//  Created by dllo on 15/12/31.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "ThirdViewController.h"
#import "ThirdTableViewCell.h"
@interface ThirdViewController ()<UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, retain)UITableView *view1;
@end

@implementation ThirdViewController
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        
    }return self;
}
- (void)dealloc {
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view1 = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStylePlain];
    _view1.dataSource = self;
    _view1.delegate = self;
    [self.view addSubview:_view1];
    [_view1 release];
    // 重用池
//    [_view1 registerNib:[UINib nibWithNibName:@"ThirdViewController" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"cell"];
    [_view1 registerClass:[ThirdTableViewCell class] forCellReuseIdentifier:@"cell"];
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 100;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ThirdTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
//    if (indexPath.row == 0) {
//        cell.label.text = @"我的活动";
//    } else if (indexPath.row == 1) {
//        cell.label.text = @"我的电影";
//    } else if (indexPath.row == 3) {
//        cell.label.text = @"清除数据";
//    }
    
    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
